//
//  GameViewFive.m
//  2048
//
//  Created by 高新川 on 15/6/7.
//  Copyright (c) 2015年 高新川. All rights reserved.
//

#import "GameViewFive.h"
#import "Game.h"
#import "PaneView.h"

@implementation GameViewFive

- (id)init {
    self = [super init];
    if (self) {
        _size = 5;
    }
    return self;
}

/*
 * view 大小290*290
 * 放5*5的格子
 * 间距5，格子大小52
 **/
- (void)initViews {
    for (int i = 0; i < _size; i++) {
        for (int j = 0; j < _size; j++) {
            PaneView *view = (PaneView *)[[self.viewArray objectAtIndex:i] objectAtIndex:j];
            view.frame = CGRectMake(5 + 57*j, 5 + 57*i, 52, 52);
            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 52, 52)];
            label.textAlignment = 1;
            [view addSubview:label];
            view.textLabel = label;
            
            [self addSubview:view];
        }
    }
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
